package com.jwt.service;

import com.jwt.entity.User;
import org.springframework.stereotype.Service;

/**
 * @author ：qs
 * @date ：Created in 2022/3/20
 * @description：
 * @modified By：
 */
@Service
public class UserServiceImpl implements UserService {


    @Override
    public User login(User user) throws Exception {
        // 模拟数据库查询并返回
        if ("zhangsan".equals(user.getUserName()) && "123".equals(user.getPassword())) {
            return new User("zhangsan", "1", "123");
        }
        throw new Exception();
    }
}
